using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace YABlog.DAL
{
    public class UserDb
    {
        

        public UserDb()
        {
            
        }

        public DataTable GetUserDetails(string name)
        {
            SqlParameter p =new SqlParameter("@name", name);
            return Functions.ExecuteParamerizedSelectCommand("GetUserDetails",new System.Data.SqlClient.SqlParameter[]{p});
        }

        public bool UpdateUserDetails(string name, string password)
        {
            SqlParameter p1 = new SqlParameter("@name", name);
            SqlParameter p2 = new SqlParameter("@password", password);

            return Functions.ExecuteNonQuery("UpdateUserDetails", new System.Data.SqlClient.SqlParameter[] { p1,p2 });
        }
    }
}
